package com.softwareengineering.trafficapplicationv2;

/**
 * This file is part of the Traffic Simulation Application.
 * The Traffic Simulation Application is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * The Traffic Simulation Application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with the Traffic Simulation Application.  If not, see <http://www.gnu.org/licenses/>.
 *  
 * @file Score.java
 * @author David Black, Chris Nelson, and Garrett Stibbs, (c) December 03, 2012
 * @description object for storing all necessary attributes of a level result
 * @attributes	level (int)
 * 				level_name (String)
 * 				p_factor (double)
 * 				score (int)
 * 				v0_limit (double)
 * @note 	object will be expanded as required to store all necessary attributes
 * 			as user-configurable variables are added to game functionality
 * 
 */

public class Score implements Constants {

	//	#################################
	//		Score Object Attributes
	//	#################################
	
	private int level;	// level code (corresponds to code in "Constants.java" and external database)
	private String level_name;	// level name (i.e. "Ring Road") for display purposes only
	private double p_factor;	// politeness factor
	private int score;	// achieved score
	private double v0_limit;	// speed limit
	
	//	#############################
	//		Default Constructor
	//	#############################

	public Score() {
		this.level_name = "";	// set default level name
		this.level = ON_RAMP;	// set default level code
		this.p_factor = 0.0;	// set default politeness factor
		this.v0_limit = 120 / 3.6;	// set default speed limit
		this.score = 0;	// set default score
	}

	//	#################################
	//		Alternative Constructor
	//	#################################
	
	public Score(int level, double p_factor, double v0_limit, int score) {
		this.level_name = ""; // set default level name
		this.level = level;	// set level code
		this.p_factor = p_factor;	// set politeness factor
		this.v0_limit = v0_limit;	// set speed limit
		this.score = score;	// set achieved score
	}
	
	//	#################
	//		Getters
	//	#################

	public int getLevel() {
		return level;	// return level code
	}

	public String getLevel_name() {
		return level_name;	// return level name
	}

	public double getP_factor() {
		return p_factor;	// return politeness factor
	}

	public int getScore() {
		return score;	// return achieved score
	}

	public double getV0_limit() {
		return v0_limit;	// return speed limit
	}
	
	//	#################
	//		Setters
	//	#################

	public void setLevel(int level) {
		this.level = level;	// set level code
	}

	public void setLevel_name(String level_name) {
		this.level_name = level_name;	// set level name
	}

	public void setP_factor(double p_factor) {
		this.p_factor = p_factor;	// set politeness factor
	}

	public void setScore(int score) {
		this.score = score;	// set achieved score
	}

	public void setV0_limit(double v0_limit) {
		this.v0_limit = v0_limit;	// set speed limit
	}

}
